import request from "./http";
//获取轮播图
export function getBanner() {
    return request({
        url: "/banner?type=3",
        method: "get"
    })
}
// 获取列表
export function getPersonalizedr() {
    return request({
        url: "/personalized?limit=30",
        method: "get",
    })
}
// 获取歌手
export function getArtistTopSong(params) {
    return request({
        url: "/artist/top/song",
        method: "get",
        params
    })
}
// 热搜列表
export function getSearchHot() {
    return request({
        url: "/search/hot",
        method: "get",
    })
}
// 对应搜索
export function getSearchSuggest({keywords,type}) {
    return request({
        url: "/cloudsearch",
        method: "get",
        params:{
            keywords:keywords,
            type:type
        }
    })
}
export function getSearchMultimatch(params) {
    return request({
        url: "/search/multimatch",
        method: "get",
        params
    })
}
// 获取最近播放
export function getUserrecord(params) {
    return request({
        url: "/user/record",
        method: "get",
        params
    })
}
// 获取动态 /comment/event?threadId=A_EV_2_6559519868_32953014
export function getHotTopid() {
    return request({
        url: "/hot/topic",
        method: "get",
        params: {
            limit: 30,
            offset: 30
        }
    })
}
//评论
export function getCommentMusic(params) {
    return request({
        url: "/comment/music",
        method: "get",
        params
    })
}
//推荐评论
export function getCommenLike({
    id,
    cid
}) {
    return request({
        url: "/comment/like",
        method: "get",
        params: {
            id: id,
            cid: cid,
            type: 0
        }
    })
}
//热门评论
export function getCommenHot({
    id
}) {
    return request({
        url: "/comment/hot",
        method: "get",
        params: {
            id: id,
            type: 0
        }
    })
}

//点赞
export function getCommenLikeId({
    id,
    cid,
    t,
    type
}) {
    return request({
        url: "/comment/like",
        method: "get",
        params: {
            id: id,
            cid: cid,
            t: t,
            type: type
        }
    })
}
// 发表评论
export function getComment({
    type,
    id,
    content
}) {
    return request({
        url: "/comment",
        method: "get",
        params: {
            t: 1,
            type: type,
            id: id,
            content: content
        }
    })
}
export function getSongDetail({
    params
}) {
    return request({
        url: "/song/detail",
        method: "get",
        params
    })
}

export function getSongUrl(params) {
    return request({
        url: "/song/url",
        method: "get",
        params
    })
}
//关注歌手
//收藏歌手
export function getArtistSub({
    id,
    t
}) {
    return request({
        url: "/artist/sub",
        method: "get",
        params: {
            id: id,
            t: t
        }
    })
}
//关注列表
export function getUserFollows(params) {
    return request({
        url: "/user/follows",
        method: "get",
        params
    })
}
export function getUserPlaylist(params) {
    return request({
        url: "/user/playlist",
        method: "get",
        params
    })
}
//每日推荐
export function getRecommendSongs(params) {
    return request({
        url: "/recommend/songs",
        method: "get",
        params
    })
}
// 喜欢音乐
export function getLike(params) {
    return request({
        url: "/like",
        method: "get",
        params
    })
}
